package _designPatterm.职责链模式;

public class Client {
    public static void main(String[] args) {
        PurchaseRequest purchaseRequest = new PurchaseRequest(1, 31000, 1);
        //创建审批人
        DepartmentApprover departmentApprover = new DepartmentApprover("张主任");
        CollegeApprover collegeApprover = new CollegeApprover("李院长");
        ViceShcoolMasterApprover viceShcoolMasterApprover = new ViceShcoolMasterApprover("王副校长");
        SchoolMasterApprover schoolMasterApprover = new SchoolMasterApprover("赵校长");

        departmentApprover.setApporver(collegeApprover);
        collegeApprover.setApporver(viceShcoolMasterApprover);
        viceShcoolMasterApprover.setApporver(schoolMasterApprover);
        schoolMasterApprover.setApporver(departmentApprover);

        departmentApprover.processRequest(purchaseRequest);
    }
}
